void fun(vector<string>& ret,string s,int n){
    if(s.size() == n) {
        ret.push_back(s);
        return;
    }
    if(s[s.size() - 1] != '0')
        fun(ret,s+"0",n);
    fun(ret,s+"1",n);
    
}
class Solution {
public:
    vector<string> validStrings(int n) {
        vector<string> ret;
        string s = "0";
        fun(ret,"0",n);
        fun(ret,"1",n);
        return ret;
    }
};